import { Router } from 'vue-router'

export default function createRouteGuard(router: Router) {
    router.beforeEach((to, _form, next) => {
        // TODO 判断是否登录
        if (to.path === '/') {
            // TODO
            next({ path: '/generator' })
            return
        }

        next()
    })
}
